<template>
  <div class="container" @click="convertTo">
    <p ref="demo" v-text="dataMain.text"></p>
  </div>
</template>

<script type="text/ecmascript-6">
  export default {
    name: 'BtnConvert',

    data() {
      return {};
    },
    props: {
      dataMain: {
        type: Object,
        required: true
      },
      itemData: {
        type: String,
        required: true
      }
    },
    methods: {
      convertTo() {
        this.$emit('convertUseOut', this.itemData);
      }
    },
    mounted() {
      this.$refs.demo.style.color = this.dataMain.textColor;
    }
  };
</script>

<style lang="stylus" rel="stylesheet/stylus" scoped>
  @import "../../assets/stylus/main.styl";
  .container
    flex-x()
    border: 1px solid #BC7347
    border-radius 6vw
    padding 2vw 4vw
    p {
    }
</style>
